/*
 * MPIDataTypes.cpp
 *
 *  Created on: Jan 10, 2013
 *      Author: fs
 */

#include "MPIDataTypes.h"

MPIDataTypes::MPIDataTypes()
{
	createMPIIndivuum();
}

MPIDataTypes::~MPIDataTypes()
{
	MPI_Type_free(&mpiIndiviuum);
}

void MPIDataTypes::createMPIIndivuum()
{
	MPI_Datatype oldtypes[1];
	int blockcounts[1];
	MPI_Aint offsets[1];
	offsets[0] = 0;
	oldtypes[0] = MPI_DOUBLE;
	blockcounts[0] = 5;
	MPI_Type_struct(1, blockcounts, offsets, oldtypes, &mpiIndiviuum);
	MPI_Type_commit(&mpiIndiviuum);
}
